package com.jwaoo.mobile.http;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Url;

/**
 * Created by jwaoo on 2017/7/10.
 */

public interface IHttpServices {

    //https://segmentfault.com/a/1190000004880821  retrofit2.0 demo

    String login = "oauth/v1/authenticate";
    String nearby = "oauth/v1/nearby";
    String users = "oauth/v1/users";
    String account = "oauth/v1/me";
    String register = "oauth/v1/register";
    String user = "oauth/v1/user/";
    String active = "oauth/v1/active";
    String url = "srv/source";
    String modify = "oauth/v1/modify";
    String forgot_password = "oauth/v1/forgot/password";
    String password = "oauth/v1/password";
    String email = "again/verification/email";

    @POST
    Call<ResponseBody> postRegister(
            @Url String url,
            @Body RequestBody requestBody
    );


    @POST
    Call<ResponseBody> postLogin(
            @Url String url,
            @Body RequestBody requestBody
    );

    @POST
    Call<ResponseBody> postURI(
            @Url String url,
            @Body RequestBody requestBody
    );

    @GET
    Call<ResponseBody> getAccountInfo(
        @Url String url
    );

    @POST
    Call<ResponseBody> getAccountInfoList(
        @Url String url
            ,@Body RequestBody requestBody
    );


    @GET
    Call<ResponseBody> getUserInfo(
            @Url String url
    );

    @POST
    Call<ResponseBody> postActive(
            @Url String url,@Body RequestBody requestBody
    );

    @POST
    Call<ResponseBody> postModify(
            @Url String url,
            @Body RequestBody requestBody
    );

    @POST
    Call<ResponseBody> postForgotPassword(
            @Url String url,
            @Body RequestBody requestBody
    );

    @POST
    Call<ResponseBody> postPassword(
            @Url String url,
            @Body RequestBody requestBody
    );

    @POST
    Call<ResponseBody> postSendEmail(
            @Url String url,
            @Body RequestBody requestBody
    );
}
